package edu.sctu.zhengsenwen.month201506.day20150619.Practice;

import javax.swing.*;

/**
 * Created by user15 on 2015/6/19.
 */
public class Dog extends AbstractAnimal{

    private boolean lovely;

    public Dog() {

        setName("史努比");
        setSound("汪，汪！");
        setEyeColor("黑白相同");
        setAge(2);
        setLovely(true);
    }


    public void setLovely(boolean value) {
        lovely = value;
    }

    public boolean isLovely(boolean value) {
        return lovely;
    }

    @Override
    public void speed() {
        JOptionPane.showMessageDialog(null,"30里/小时","史努比的跑步速度",1);
    }
}
